package com.fyp.erp;

/**
 *  Mobile ERP Business Solution (Final Year Project)
 *  B.E CIS N.E.D University Of Engineering & Technology
 *  Group Members:
 *                  1. Malik Wahaj Ahmed (CS-74)
 *                  2. Hira Moazzam (CS-66)
 */

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import android.view.View;
import android.view.Window;
import android.widget.Button;


public class LoginPage extends Activity  {
	public void onCreate (Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.loginpage);
		Button btn = (Button) findViewById(R.id.button1);
		btn.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				Intent i = new Intent("com.fyp.erp.CorporateHome");
				startActivity(i);
			}

		});

	}

	public boolean onCreateOptionsMenu(Menu menu) {
		super.onCreateOptionsMenu(menu);
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.loginmenu, menu);
		return true;
	}



	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle item selection
		switch (item.getItemId()) {
		case R.id.item01:
			Log.i("ITEM", "Signup Selected");;
			Intent Intent1 = new Intent(this, Signup.class);
			startActivityForResult(Intent1, 0);
			return true;

		case R.id.item02:
			Intent Intent2 = new Intent(this, ForgotPassword.class);
			startActivityForResult(Intent2, 0);
			return true;

		case R.id.item03:
			Intent Intent3 = new Intent(this, Settings.class);
			startActivityForResult(Intent3, 0);
			return true;

		default:
			return super.onOptionsItemSelected(item);
		}
	}

}
